<template>
  <el-dialog v-drag-dialog title="登记新用户" :visible.sync="dialogFormVisible" ref="tadlg" width="30%">
    <el-form
      :rules="rules"
      ref="dataForm"
      :model="data"
      label-position="right"
      label-width="100px"
      size="small"
      style="width: 80%; margin-left:6px;"
    >
      <el-form-item label="用户姓名：">
        <el-input placeholder="请输入" v-model="data.name"></el-input>
      </el-form-item>

      <el-form-item label="手机号：">
        <el-input placeholder="请输入" v-model="data.mobile"></el-input>
      </el-form-item>

      <el-form-item label="电子邮箱：">
        <el-input placeholder="请输入" v-model="data.email"></el-input>
      </el-form-item>

      <el-form-item label="密码：">
        <el-input placeholder="请输入" v-model="data.password"></el-input>
      </el-form-item>
    </el-form>

    <div slot="footer" class="dialog-footer">
      <el-button @click="onCancelAdd">取消</el-button>
      <el-button type="primary" @click="onSaveAdd">保存</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      dialogFormVisible: false,
      rules:[],
      data:{
          name:'',
          mobile:'',
          email:'',
          password:''
      },
    };
  },
  methods:{
      Show(){
          this.dialogFormVisible=true;
      },
      onCancelAdd(){
          this.dialogFormVisible=false;
      },
      onSaveAdd(){},
  }
};
</script>